<%@ page import="cn.kgc.service.NewsService" %>
<%@ page import="cn.kgc.service.impl.NewsServiceImpl" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.kgc.pojo.News" %><%--
  Created by IntelliJ IDEA.
  Users: Administrator
  Date: 2018/12/28
  Time: 17:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    NewsService newsService = new NewsServiceImpl();
    List<News> list = newsService.getNewsList();
    for (News news:list) {
        out.print(news.getId()+"&nbsp;");
        out.print(news.getTitle()+"<br/>");
    }

%>
</body>
</html>
